export default {
  namespaced: true,
  state: {
    token: localStorage.getItem('token') || '',
    userInfo: {}
  },
  mutations: {
    updateToken (state, payload) {
      state.token = payload
      localStorage.setItem('token', payload)
    },
    updateUserInfo (state, payload) {
      state.userInfo = payload
    }
  }
}
